#include "MiniProjectMainWindow.qth"
#include "Module/ModuleRegistry.hpp"
#include "PrjMod/ProjectModule.hpp"
#include "AbsUI/UICommandRegistry.hpp"
#include "AbsUI/ConnCfgWidgetFactory.hpp"
#include "Storage/ConnectionConfigFactory.hpp"
#include "Storage/ConnectionConfigCollection.hpp"
#include <QtGui/QApplication>

int main( int argc, char** args)
{
	QApplication app( argc, args) ;

	MiniProjectMainWindow mainWindow;

	AbsUI::UICommandRegistry cmdRegistry;
	Storage::ConnectionConfigFactory connCfgFactory;
	Storage::ConnectionConfigCollection connCfgCollection( connCfgFactory);
	AbsUI::ConnCfgWidgetFactory conCfgWidgetFactory;
	Module::ModuleRegistry::instance().configure( &mainWindow, &cmdRegistry, &conCfgWidgetFactory, &connCfgFactory, &connCfgCollection);
	Module::ModuleRegistry::instance().registerModule( new PrjMod::ProjectModule);

	mainWindow.show();
	return app.exec();
}